package primaryBean2;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import primaryBean2.impl.WorkerService;

/**
 * Created by ztt on 2017/9/21.
 */
@Configuration
@ComponentScan
public class PersonConfig {

    @Bean
    @Primary
    public PersonService personService(){
        return new WorkerService();
    }
}
